package com.lgh.hotel.config;


import com.lgh.hotel.service.TimingService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.Scheduled;

/**
 * 定时打卡类
 * */

@Slf4j
@Configuration
public class TimingConfig {


    @Autowired
    TimingService timingService;

    //0 0 0 */1 * ?
    //0 37 * * * ?
    @Scheduled(cron = "0 30 * * * ?")
    public void signIn(){
        timingService.checkOut();
        log.info("定时清理住户成功");
    }



}
